function writexml(xml, file)
% writexml(xml, file)

fid = fopen(file, 'w');

if fid < 0
  disp(['Couldn''t write architecture to ' file]);
  return
end

fprintf(fid, '%s', xml);
fclose(fid);
